package com.mzy.olddate.demo;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author Ives
 * * @date 2021/9/3
 */
public class Demo4 {
  public static void main(String[] args) {


    String old="010700010,010700010010,010700020,010700020010,010700030,010700030010,010700030010010,010700030010020,010700030010030,010700040,010700040010,010700040020,010700050,010700050010,010700060,010700060010,010700060020,010700060030,010700060040,010700080,010700090,010700100,010700100010,010700100020,010700150,010700160,010700160010,010700160020,010700160040,010700160050,010700160060,010700160070,010700160080,010700160090,010700160090010,010700160090020,010700160090030,010700160090040";
    String newDdd="010700910010,010700910010010,010700910020,010700910020010,010700910030,010700910030010,010700910030010010,010700910030010020,010700910030010030,010700910040,010700910040010,010700910040020,010700910050,010700910050010,010700910060,010700910060010,010700910060020,010700910060030,010700910060040,010700910080,010700910090,010700910100,010700910100010,010700910100020,010700910150,010700910160,010700910160010,010700910160020,010700910160040,010700910160050,010700910160060,010700910160070,010700910160080,010700910160090,010700910160090010,010700910160090020,010700910160090030,010700910160090040";

    String[] split = old.split(",");
    String[] split2 = newDdd.split(",");

    List<String> strings = Arrays.asList(split);
    List<String> strings2 = Arrays.asList(split2);

    ArrayList<String> list = new ArrayList<>();

    for (int i = 0; i < strings.size(); i++) {
      String demo="update CMS_DRAFT_COLUMN_INFO_5G set P_COL_CODE='XXYY' where P_COL_CODE='AABB';\n" +
              "update CMS_COLUMN_INFO_5G set P_COL_CODE='XXYY' where P_COL_CODE='AABB';\n";

      String s = strings.get(i);
      String s1 = strings2.get(i);

      String aabb = demo.replaceAll("AABB", s);
      String bbaa = aabb.replaceAll("XXYY", s1);

      System.out.println(bbaa);
    }

  }
}
